<?php
/**
 * @description
 *  文章详细页面
 *
 * filename : /admin/modules/content/views/content_data_view.php
 * date     : 2009-2-2 18:01
 * author   : hotgun
 * email    : hotgun@163.com
 * 
 * (c)copyright hotgun
 *
 * $Id: /admin/modules/content/views/content_data_view.php,v 1.0 2009-2-2 18:01 $
 */

// 取得返回字符串


$back_url   = strcode(getcookie('back_url'), 'DECODE');
if($back_url == '') $back_url   = $mod_url['li'];


$tbl_zone   = $_TABLES['city'];
$conn       = & get_db_conn();
$sql1="SELECT * FROM $tbl_zone ORDER BY num asc";
$rs = & $conn->GetAll($sql1);

$tbl_article_params = $_TABLES['article_params'];
$conn   = & get_db_conn();

require($abs_admin_cppath . '/header.php');
?>
<script charset="utf-8" src="<?php echo $url_global['common']; ?>/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="<?php echo $url_global['common']; ?>/kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="<?php echo $url_global['common']; ?>/kindeditor/plugins/code/prettify.js"></script>
<script>
	KindEditor.ready(function(K) {
		var editor1 = K.create('textarea[id="content"]', {
			cssPath : '<?php echo $url_global['common']; ?>/kindeditor/plugins/code/prettify.css',
			uploadJson : '<?php echo $url_global['common']; ?>/kindeditor/php/upload_json.php',
			fileManagerJson : '<?php echo $url_global['common']; ?>/kindeditor/php/file_manager_json.php',
			allowFileManager : true,
			afterCreate : function() {
				var self = this;
				K.ctrl(document, 13, function() {
					self.sync();
					K('form[name=example]')[0].submit();
				});
				K.ctrl(self.edit.doc, 13, function() {
					self.sync();
					K('form[name=example]')[0].submit();
				});
			}
		});
		prettyPrint();
	});
</script>
<link rel="stylesheet" href="<?php echo $url_global['common']; ?>/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="<?php echo $url_global['common']; ?>/kindeditor/plugins/code/prettify.css" />

<link rel="stylesheet" rev="stylesheet" href="<?php echo $url_global['common']; ?>/css/win.css" type="text/css" media="all">

		<div class="datacontainer2" style="width:90%;">
<div class="header">
</div>
<table BORDER="0" cellpadding="0" cellspacing="0" width="100%" class="list_table">

<TR>
	<TD width="108" align="right" class="caption">标的名称：</TD>
	<TD width="946" class="cell">
	<?php echo $viewvar['title']; ?>
	</TD>
</TR>
<?php
/* +------------------------------------------------------------------------+ */
/**
 * 文章分类相关录入行开始
 * 如果当前栏目类型为单页文章或者为多页文章，不需要选择分类，
 * 指定分类id
 *
 */
$class_info     = get_node_info($$class_var, $viewvar['cid']);
$class_name     = $class_info['cname'];
if($viewvar['price']=="" or $viewvar['price']==0){
	$price="面议";
}else{
	$price=$viewvar['price'];
}
?>
<TR>
	<TD width="108" align="right" class="caption">当前分类：</TD>
	<TD class="cell">
	<span id="div_class_info"><?php echo $class_name;?></span>
	</TD>
</TR>


<TR>
	<TD width="108" align="right" class="caption">交易意向：</TD>
	<TD class="cell">
        <?php foreach($intention_array as $k=>$v){?>
	    <INPUT TYPE="radio" NAME="article[intention]" id="inton<?php echo $k;?>" value="<?php echo $k;?>" <?php if($k==$viewvar['intention']){echo 'checked';} ?>> <label for="inton<?php echo $k;?>"><?php echo $v;?></label>&nbsp;&nbsp;&nbsp;&nbsp;
        <?php }?>
	</TD>
</TR>

<TR>
	<TD width="108" align="right" class="caption">联系人：</TD>
	<TD class="cell"><?php echo $viewvar['lxname']; ?>
		<?php if(!$viewvar['lxSex']){echo '先生';}else{echo '女士';} ?>
    </TD>
</TR>
<TR>
  <TD width="108" align="right" class="caption">联系电话：</TD>
  <TD class="cell"><?php echo $viewvar['lxphone']; ?></TD>
</TR>
<TR>
  <TD width="108" align="right" class="caption">联系时间：</TD>
  <TD class="cell"><?php echo $viewvar['lxtime']; ?></TD>
</TR>

<TR>
	<TD width="108" align="right" class="caption">项目编号：</TD>
	<TD class="cell"><?php echo $viewvar['zdbh']; ?></TD>
</TR>
<TR>
    <TD	width="108" align="right" class="caption">信息有效期：</TD>
	<TD	class="cell"><?php echo date('Y-m-d H:i:s',$viewvar['endtime']);?>
	  </TD>
    </TR>
<TR>
	<TD	width="108" align="right" class="caption"> 项目价位：</TD>
	<TD	class="cell"><?php echo $price; ?></TD>
    </TR>

<TR>
<TR>
	<TD	width="108" align="right" class="caption"> 所在区域：</TD>
	<TD	class="cell"><?php echo $viewvar['city1']["cname"]; ?><?php echo $viewvar['city2']["cname"]; ?> </TD>
    </TR>
<TR>
	<TD width="108" align="right" class="caption"><?php echo $cata_keylang; ?>缩略图片：</TD>
	<TD class="cell" valign="top" align="left">
    <?php
    if($viewvar["thumb"]==""){
		$img="/common/images/nopic.jpg";
		}else{
		$img="/uploads/".$viewvar["thumb"];
		}
	?>	  
<img id="obj_small_image" src="<?php echo $img; ?>" width="120" height="90"></TD>
	</TR>
<TR>
    <TD align="right" class="caption">
        项目介绍：
    </TD>  
	<TD class="cell graycell">
    <textarea name="article[content]" id="content" style="width:700px;height:400px;visibility:hidden;"><?php echo htmlspecialchars($viewvar['content']); ?></textarea>
      
	</TD>
</TR>
<TR>
	<TD width="108" align="right" class="caption">发布时间：</TD>
	<TD class="cell">
	  <?php echo date("Y-m-d H:i:s",$viewvar['ctime']); ?>
	  </TD>
</TR>
</TABLE>

		</div>
<?php
echo_html_img_js()
?>
<SCRIPT LANGUAGE="JavaScript">
<!--
function outer_file_url_onclick(o) {
    var div = GE('html_file_url');
    if(o.checked) {
        div.style.display = 'block';
    } else {
        div.style.display = 'none';
    }
}
//-->
</SCRIPT>
<script> 
function sszd(x){
	var url	= '<?php echo $G_web_root;?>/ajax/getcity.php?city='+x;
	$.get(url,function(data){
			$("#city_list").html(unescape(data));
	});
}
<?php if($pars['city']){?>
    var url	= '<?php echo $G_web_root;?>/ajax/getcity.php?city=510000&not=y&sel=<?php echo $pars['city'];?>';
	$.get(url,function(data){
			$("#city").html(unescape(data));
	});
    <?php if($pars['city1']){?>
    var url	= '<?php echo $G_web_root;?>/ajax/getcity.php?city=<?php echo $pars['city'];?>&sel=<?php echo $pars['city1'];?>';
	$.get(url,function(data){
			$("#city_list").html(unescape(data));
	});

<?php }
    else{
        ?>
        var url	= '<?php echo $G_web_root;?>/ajax/getcity.php?city=<?php echo $pars['city'];?>&sel=0';
    	$.get(url,function(data){
    			$("#city_list").html(unescape(data));
    	});
        <?php 
    }
}else{
    ?>
    var url	= '<?php echo $G_web_root;?>/ajax/getcity.php?city=510000&not=y';
	$.get(url,function(data){
			$("#city").html(unescape(data));
	});
    var url	= '<?php echo $G_web_root;?>/ajax/getcity.php?city=510100&sel=0';
	$.get(url,function(data){
			$("#city_list").html(unescape(data));
	});
    <?php
}?>

function xglx(){
    if($("#xy").css('display')=='none'){
        $("#xy").css('display','block');
    }else{
        $("#xy").css('display','none');
    }
}
function xglxsave(){
    var st='';
    for(var i=0;i<5;i++){
        if($('#lx'+i).val()!=''){
            st+='&lx'+i+'='+$('#lx'+i).val();
        }
    }
    var url	= '<?php echo $G_web_root;?>/ajax/changecache.php?p=y'+st;//window.location.href=url;
	$.get(url,function(data){
		$("#type").html(data);//xy
        //alert('请重新载入页面查看修改情况');
	});
}
article_class_onchange('<?php echo @(int)$viewvar['cid'];?>');
</script>
<?php
require($abs_admin_cppath . '/footer.php');
?>